<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>问卷后台</title>
    <link rel="stylesheet" href="__STATIC__/plugins/layui/css/layui.css" media="all">
    <link rel="stylesheet" type="text/css" href="http://www.jq22.com/jquery/font-awesome.4.6.0.css">
    <link rel="stylesheet" href="__STATIC__/build/css/app.css" media="all">
    <link rel="stylesheet" href="__STATIC__/css/main.css" />
</head>
<body>
<div class="layui-layout layui-layout-admin kit-layout-admin">
    <!--顶部和左侧菜单-->
    {include file='menu'}
    <!--body部分-->
    {__CONTENT__}
    <!--底部-->
    <!--<div class="layui-footer">-->
        <!--&lt;!&ndash; 底部固定区域 &ndash;&gt;-->
        <!--2017 &copy;-->
        <!--<a href="http://kit.zhengjinfan.cn/">kit.zhengjinfan.cn/</a> MIT license-->
    <!--</div>-->
</div>
<!--<script type="text/javascript">-->
    <!--var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");-->
    <!--document.write(unescape("%3Cspan id='cnzz_stat_icon_1264021086'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s22.cnzz.com/z_stat.php%3Fid%3D1264021086%26show%3Dpic1' type='text/javascript'%3E%3C/script%3E"));-->
<!--</script>-->
<!--<script src="__STATIC__/plugins/layui/layui.js"></script>-->
<script src="__STATIC__/build/js/app.js"></script>
<script src="__STATIC__/build/js/nprogress.js"></script>
<script type="text/javascript" src="__STATIC__/datas/nav.js"></script>
<script src="__STATIC__/js/index.js"></script>
<script src="__STATIC__/js/tab.js"></script>
<script src="__STATIC__/js/common.js"></script>
<script src="__STATIC__/js/jquery.js"></script>
<script>
    layui.use('layer', function() {
        var $ = layui.jquery,
            layer = layui.layer;

        $('#personalData').on('click', function() {
            layer.open({
                title: '资料修改',
                maxmin: true,
                type: 1,
                content: '<form class="layui-form" action=""><br/>\n' +
                '    <div class="layui-form-item">\n' +
                '    </div>\n' +
                '    <div class="layui-form-item">\n' +
                '        <div class="layui-inline">\n' +
                '            <label class="layui-form-label">原密码</label>\n' +
                '            <div class="layui-input-inline">\n' +
                '                <input type="text" name="password" lay-verify="pas" autocomplete="off" placeholder="请确认密码" class="layui-input">\n' +
                '            </div>\n' +
                '        </div>\n' +
                '    </div>\n' +
                '    <div class="layui-form-item">\n' +
                '        <div class="layui-inline">\n' +
                '            <label class="layui-form-label">确认密码</label>\n' +
                '            <div class="layui-input-inline">\n' +
                '                <input type="text" name="pas" lay-verify="pas" autocomplete="off" placeholder="请确认密码" class="layui-input">\n' +
                '            </div>\n' +
                '        </div>\n' +
                '    </div>\n' +
                '</form>',
                area: ['400px', '350px'],
                btn: ['确定', '取消'],
                offset: '100px',
                yes:function (index,layero){
                    var password= $('input[name=password]').val();
                    var pas= $('input[name=pas]').val();
                    if(pas!=password){
                        layer.msg('密码不一致', {icon: 5, time: 2000, area: '200px', type: 0, anim: 6,}, function () {
                            $("input[name=pas]").focus();
                        });
                        return false;
                    }
                    var data={
                        nickname:$('input[name=nickname]').val(),
                        mobile:$('input[name=mobile]').val(),
                        password:$('input[name=password]').val()
                    };
                    $.post('{:url("index/edit")}',data,function(respance){
                        if(respance.token=='200'){
                            layer.msg(respance.msg);
                            layer.close(index);
                        }else{
                            layer.msg(respance.msg, {type: 1});
                        }
                    })
                }
            });
        });
        $('#cancellation').on('click', function () {
            layer.confirm('确认注销？', {icon: 3, title:'提示'}, function(index){
                $.post('{:url("index/del")}',function(respance){
                    if(respance.token=='200'){
                        layer.msg(respance.msg);
                        layer.close(index);
                        window.location.replace('{:url("index/login")}');
                    }
                })
            });
        });
        $('#demoReload').on('click',function(){

        });
    });
</script>
</body>

</html>